package com.yihu.yihuds.service;

import java.io.IOException;

import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;
import com.yihu.web.bean.GroupBuy;
import com.yihu.web.bean.vo.GroupBuyQuery;
import com.yihu.web.dataService.hessian.interfaceService.GroupBuyHService;


public class GroupBuyService{
	GroupBuyHService service = null;
	public GroupBuyService(){
		try {
			service= (GroupBuyHService)ResourceMongoDBManager
					.getSingleton().getBeans("groupBuyHSC");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public Object findByPage(GroupBuyQuery query){
		return service.findByPage(query);
	}
	
	public Object getById(String id){
		return service.get(id);
	}

	public Object updateGroupBuy(GroupBuy groupBuy){
		return service.update(groupBuy);
	}
	
	public Object addGroupBuy(GroupBuy groupBuy){
		return service.insert(groupBuy);
	}
	
	public Object changeState(GroupBuy groupBuy){
		return service.changeState(groupBuy);
	}
	public Object deleteGroupBy(String id){
		return service.deleteGroupBy(id);
	}
	
	
}
